import request from '@/utils/request'

// 查询产品服务列表
export function listService(query) {
  return request({
    url: '/tianqi/service/list',
    method: 'get',
    params: query
  })
}

// 查询产品服务详细
export function getService(id) {
  return request({
    url: '/tianqi/service/' + id,
    method: 'get'
  })
}

// 新增产品服务
export function addService(data) {
  return request({
    url: '/tianqi/service',
    method: 'post',
    data: data
  })
}

// 修改产品服务
export function updateService(data) {
  return request({
    url: '/tianqi/service',
    method: 'put',
    data: data
  })
}

// 设置首页展示
export function updateServiceDisplayHome(data) {
  return request({
    url: '/tianqi/service/displayHome',
    method: 'put',
    data: data
  })
}

// 删除产品服务
export function delService(id) {
  return request({
    url: '/tianqi/service/' + id,
    method: 'delete'
  })
}
